import React, { Component } from 'react'
import '../index.css'

export class Navbar2 extends Component {
  render() {
    const { leftSlot, centerSlot, rightSlot, typeEle } = this.props
    return (
      <div className="nav-bar">
        <div className="left">{leftSlot}</div>
        <div className="center">{centerSlot}</div>
        <div className="right">{rightSlot}</div>
        {/* 下面这个是作用域插槽 */}
        <div className="right">{typeEle('yes')}</div>
      </div>
    )
  }
}

export default Navbar2
